<?php
class InsuranceReportItem {
    private $ticket_id;
    private $patient_code;
    private $patient_name;
    private $original_price;
    private $insurance_price;
    private $patient_price;
    private $real_payment;
    
    public function __construct($ticketId, $patientCode, $patientName,
        $originalPrice = 0, $insurancePrice = 0, $patientPrice = 0, $realPayment = 0) {
        $this->ticket_id        =   $ticketId;
        $this->patient_code     =   $patientCode;
        $this->patient_name     =   $patientName;
        $this->original_price   =   $originalPrice;
        $this->insurance_price  =   $insurancePrice;
        $this->patient_price    =   $patientPrice;
        $this->real_payment     =   $realPayment;
    }
    
    public function getTicketId() {
        return $this->ticket_id;
    }
    
    public function getPatientCode() {
        return $this->patient_code;
    }
    
    public function getPatientName() {
        return $this->patient_name;
    }
    
    public function getOriginalPrice() {
        return $this->original_price;
    }
    
    public function getInsurancePrice() {
        return $this->insurance_price;
    }
    
    public function getPatientPrice() {
        return $this->patient_price;
    }
    
    public function getRealPayment() {
        return $this->real_payment;
    }

    // General getters
    public function get($field) {
        if (property_exists($this, $field)) {
            return $this->$field;
        }
        return '';
    }
    
    public function getLocalizedNumber($field) {
        if (!property_exists($this, $field)) {
            return '';
        }
        if (is_numeric($this->$field)) {
            return L10nHelper::renderNumber($this->$field);
        }
        return $this->$field;
    }
}
?>